Provides tools to filter environment maps and improve IBL within the PbsMaterial. More...
Static Public Member Functions | |
static void | requestEnvMapFiltering (nkGraphics::Texture *envMap, nkGraphics::Texture *outFilteredMap, unsigned int outPixelDims=128) |
static void | requestIrradianceComputing (Texture *input, Texture *output) |
Provides tools to filter environment maps and improve IBL within the PbsMaterial.
|
static |
Requests the filtering of an environment map.
This tool accepts cube and 2d environment maps.
For best result, it is advised to provide an environment map with its full mip chain available. The filtering will be able to interpolate better the roughness levels and this will help in reducing noise in the final result, for rough parameters.
envMap | The environment map to filter. Can be a cube-map or a spherical environment map. |
outFilteredMap | The texture in which to output the result. The texture will be a cube map at the end of the processing. |
outPixelDims | The size, in pixels, of one face of the resulting cube map. The face will be of dimensions outPixelDims x outPixelDims. |
|
static |
Computes the irradiance map of a texture.
This tool accepts cube and 2d environment maps.
This function will compute the values from the input texture's first mip, using spherical harmonics.
input | The texture from which to compute the irradiance map. |
output | The texture that will receive the irradiance computed. |